package suncertify.gui;

import javax.swing.table.AbstractTableModel;

import suncertify.contractors.Contractor;

/**
 * Defines the dependency between the implementor of this interface {@link ClientApplicationFrameControllerInterface}
 * and the extender of the {@link AbstractTableModel} class. The implementor of
 * {@link ClientApplicationFrameControllerInterface} should hold a reference to this interface and communicate with it's
 * methods.
 */
public interface ContractorsViewInterface {

    /**
     * Definition for a method that returns the selected {@link Contractor} object. The selected contractor represents
     * the row which is selected in a list of contractors. (e.g. the selected row in a JTable)
     * 
     * @return The selected {@link Contractor} object.
     */
    public Contractor getSelectedContractor();

    /**
     * Definition for a method that refreshes the selected contractor's fields in the user interface. E.g. when the
     * owner field value changes for the selected contractor in a JTable.
     */
    public void refreshSelectedContractor();
}
